import Vue from 'vue'
import Vuex from 'vuex'

//挂载Vuex
Vue.use(Vuex)

//创建VueX对象
const store = new Vuex.Store({
  state: {
    count: 0,
    qiniuToken:''
  },
  mutations: {
    increment (state) {
      state.count++
    },
    updateQiniuToken(state, token){
      state.qiniuToken = token
    }
  }
})

export default store
